#!/usr/bin/env bash
#
# Build tests for STM32F103RE BigTreeTech (SKR E3 DIP v1.0)
#

# exit on first failure
set -e

#
# Build with the default configurations
#
restore_configs
opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP SERIAL_PORT 1 SERIAL_PORT_2 -1
opt_enable SDSUPPORT EMERGENCY_PARSER
exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration" "$3"

restore_configs
opt_set MOTHERBOARD BOARD_BTT_SKR_CR6 SERIAL_PORT -1 SERIAL_PORT_2 2 TEMP_SENSOR_BED 1 BUTTON1_PIN PA12
opt_enable CR10_STOCKDISPLAY SDSUPPORT EMERGENCY_PARSER FAN_SOFT_PWM \
           NOZZLE_AS_PROBE Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN Z_SAFE_HOMING \
           PROBE_ACTIVATION_SWITCH PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE \
           PROBING_HEATERS_OFF PREHEAT_BEFORE_PROBING CUSTOM_USER_BUTTONS BUTTON1_IMMEDIATE \
           CUSTOM_MENU_MAIN MAIN_MENU_ITEM_1_CONFIRM MAIN_MENU_ITEM_2_IMMEDIATE MAIN_MENU_ITEM_3_DESC MAIN_MENU_ITEM_3_GCODE \
           CUSTOM_MENU_CONFIG CONFIG_MENU_ITEM_1_CONFIRM CONFIG_MENU_ITEM_2_IMMEDIATE CONFIG_MENU_ITEM_3_DESC CONFIG_MENU_ITEM_3_GCODE
opt_disable NOZZLE_TO_PROBE_OFFSET
exec_test $1 $2 "BigTreeTech SKR CR6 PROBE_ACTIVATION_SWITCH, Probe Tare" "$3"
